<div class="box box-default">
  <div class="box-body">

    <form class="form-inline">
      <div class="box box-default">
        <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left:0px;margin-bottom:8px !important;">
          <button *ngIf="_.includes(menuResourceSet,'btn-QDII-lrms-save')" type="button" class="btn btn-primary" (click)="save()">
            <i class="fa fa-save"></i>保存</button>
          <button *ngIf="_.includes(menuResourceSet,'btn-QDII-lrms-saveAndCommit')" type="button" class="btn btn-primary" (click)="submit()">
            <i class="fa fa-edit"></i>保存并提交</button>
          <button *ngIf="_.includes(menuResourceSet,'btn-QDII-lrms-findAndFill')" type="button" class="btn btn-primary" (click)="loadlist()">
            <i class="fa fa-search"></i>查询并填充</button>
          <button *ngIf="_.includes(menuResourceSet,'btn-QDII-lrms-addRow')" type="button" class="btn btn-primary" (click)="addRow()">
            <i class="fa fa-edit"></i>新增一行</button>
          <button *ngIf="_.includes(menuResourceSet,'btn-QDII-lrms-addRow')" type="button" class="btn btn-primary" (click)="delRow()">
            <i class="fa fa-edit"></i>删除行</button>
          <button type="button" class="btn btn-box-tool pull-right" data-widget="collapse">
            <i class="fa fa-minus"></i>
          </button>
        </div>
        <div class="box-body">
          <div class="form-group col-lg-12" style="padding-left:0px !important;margin-bottom:8px;">
            <label class="control-label">条款出处：</label>
            <!-- <select class="form-control" style="min-width:182px" [(ngModel)]="dataInfo.sFileSource" name="sFileSource" (ngModelChange)="changeCheckedInfo('sFileSource')">
              <option [value]="''" selected="selected">--请选择--</option>
              <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.NX_SOURCE">{{item.sItemValue}}</option>
            </select> -->
            <input class="form-control" placeholder="条款出处" [(ngModel)]="dataInfo.sFileSource" name="sFileSource">
            <button type="button" class="btn btn-primary" (click)="changeCheckedInfo('sFileSource')">确定</button>
            <label class="control-label">属性：</label>
            <select class="form-control" style="min-width:182px" [(ngModel)]="dataInfo.sItemType" name="sItemType" (ngModelChange)="changeCheckedInfo('sItemType')">
              <option [value]="''" selected="selected">--请选择--</option>
              <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.QDII_RECORD_TYPE">{{item.sItemValue}}</option>
            </select>
            <label class="control-label">适用QDII类别：</label>
            <select [(ngModel)]="dataInfo.sFundType" name="sFundType" id="QDIIInputFundType" (ngModelChange)="changeCheckedInfo('sFundType')"
              multiple></select>
          </div>
          <div class="form-group col-lg-12" style="padding-left:0px !important;">
            <label class="control-label">文件名称：</label>
            <input class="form-control" placeholder="文件名称" maxlength="100" [(ngModel)]="dataInfo.sFileName" name="sFileName">
            <button type="button" class="btn btn-primary" (click)="changeCheckedInfo('sFileName')">确定</button>
            <label class="control-label">内容：</label>
            <input class="form-control" placeholder="内容" maxlength="2000" [(ngModel)]="dataInfo.f1" name="f1">
            <button type="button" class="btn btn-primary" (click)="changeCheckedInfo('f1')">确定</button>
            <label class="control-label">适用QDII名称：</label>
            <div class="input-group" (click)="showApplyQDIIName()">
              <input class="form-control" disabled placeholder="适用QDII名称" [(ngModel)]="dataInfo.sFundGroupdsZh" name="sFundGroupdsZh" (ngModelChange)="changeCheckedInfo('sFundGroupdsZh')">
              <div class="input-group-addon" (click)="showApplyQDIIName()">
                <i class="fa fa-search"></i>
              </div>
            </div>
          </div>
        </div>
      </div>
    </form>

    <div class="ibt-fixed-table-container">
      <!-- <div class="table-scroll-content"> -->
      <table id="input-table" class="table table-bordered table-hover table-striped table-keep-line" style="margin-top:unset !important;">
        <thead>
          <tr role="row">
            <th style="width:50px !important">
              <div class="cell">
                <div class="checkbox checkbox-primary">
                  <input type="checkbox" id="isCheckedAll" [(ngModel)]="isCheckedAll" name="isCheckedAll" (ngModelChange)="checkedAll()">
                  <label>
                  </label>
                </div>
              </div>
            </th>
            <th style="width:60px !important">
              <div class="cell-padding">序号</div>
            </th>
            <th>
              <div class="cell-padding">条款出处</div>
            </th>
            <th>
              <div class="cell-padding">文件名称</div>
            </th>

            <th>
              <div class="cell-padding">属性</div>
            </th>

            <th>
              <div class="cell-padding">适用QDII类别</div>
            </th>
            <th>
              <div class="cell-padding">适用QDII名称</div>
            </th>
            <th>
              <div class="cell-padding">内容</div>
            </th>
            <th>
              <div class="cell-padding">指标释义</div>
            </th>
            <th style="width:180px !important">
              <div class="cell-padding">bloomberg系统能否控制</div>
            </th>
            <th>
              <div class="cell-padding">系统设置代码</div>
            </th>
            <th>
              <div class="cell-padding">阀值</div>
            </th>
            <th>
              <div class="cell-padding">人工控制方法说明</div>
            </th>
            <th>
              <div class="cell-padding">系统实施相关条件</div>
            </th>
            <!-- <th>
                <div class="cell-padding">备注1</div>
              </th> -->
            <th>
              <div class="cell-padding">备注2</div>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let item of listData;let index = index;">
            <!-- <tr  > -->
            <td style="width:50px !important">
              <div class="cell" style="width:50px !important">
                <div class="checkbox checkbox-primary">
                  <input type="checkbox" name="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll()">
                  <label>
                  </label>
                </div>
              </div>
            </td>
            <td style="width:60px !important">
              <div>{{index+1}}</div>
            </td>
            <td [attr.title]="item.sFileSource" (click)="changeEleStatus(index,'sFileSource','1')">
              <div class="cell">
                <div id="sFileSource"></div>
                <div *ngIf="elementShow[index].sFileSource == ''">{{item.sFileSource}}</div>
                <input *ngIf="elementShow[index].sFileSource != ''" (blur)="changeEleStatus(index,'sFileSource','2')" class="input-width" maxlength="2000" name="sFileSource" [(ngModel)]="item.sFileSource"
                  (ngModelChange)="inputChange(index,item.sFileSource,'sFileSource')">
              </div>
            </td>
            <td [attr.title]="item.sFileName" (click)="changeEleStatus(index,'sFileName','1')">
              <div class="cell">
                <div id="sFileName"></div>
                <div *ngIf="elementShow[index].sFileName == ''">{{item.sFileName}}</div>
                <input *ngIf="elementShow[index].sFileName != ''" (blur)="changeEleStatus(index,'sFileName','2')" class="input-width" maxlength="100" name="sFileName" [(ngModel)]="item.sFileName" (ngModelChange)="inputChange(index,item.sFileName,'sFileName')">
              </div>
            </td>
            <td [attr.title]="item.sItemTypeZh" (click)="changeEleStatus(index,'sItemType','1')">
              <div class="cell">
                <div id="sItemType"></div>
                <div *ngIf="elementShow[index].sItemType == ''">{{item.sItemTypeZh}}</div>
                <select *ngIf="elementShow[index].sItemType != ''" (blur)="changeEleStatus(index,'sItemType','2')" class="select-margin input-width" [(ngModel)]="item.sItemType" name="sItemType" (ngModelChange)="inputChange(index,item.sItemType,'sItemType')">
                  <!-- <option [value]="''" selected="selected">--请选择--</option> -->
                  <option [value]="it.sItemKey" *ngFor="let it of dictionaryList.QDII_RECORD_TYPE">{{it.sItemValue}}</option>
                </select>
              </div>
            </td>
            <td [attr.title]="item.sFundTypeZh" (dblclick)="changeEleStatus(index,'sFundType','1')">
              <div class="cell">
                <div class="short_name" *ngIf="elementShow[index].sFundType == ''">{{item.sFundTypeZh}}</div>
                <p-multiSelect  *ngIf="elementShow[index].sFundType != ''" (blur)="changeEleStatus(index,'sFundType','2')" [options]="dictionaryInfo" defaultLabel="请选择" [(ngModel)]="item.sFundType" [maxSelectedLabels]="9999" [ngModelOptions]="{standalone: true}"></p-multiSelect>
              </div>
            </td>
            <td [attr.title]="item.sFundGroupdsZh" (click)="changeEleStatus(index,'sFundGroupdsZh','1')">

              <div class="short_name" *ngIf="elementShow[index].sFundGroupdsZh == ''">{{item.sFundGroupdsZh}}</div>
              <div class="input-group right_tooltip cell" (blur)="changeEleStatus(index,'sFundGroupdsZh','2')" *ngIf="elementShow[index].sFundGroupdsZh != ''">
                <div id="sFundGroupdsZh"></div>
                <input class="input-width" [(ngModel)]="item.sFundGroupdsZh" name="sFundGroupdsZh" disabled (ngModelChange)="inputChange(index,item.sFundGroupdsZh,'sFundGroupdsZh')">
                <div class="input-group-addon" (click)="showApplyQDIIName(index)">
                  <i class="fa fa-search"></i>
                </div>
              </div>

            </td>

            <td [attr.title]="item.f1" (click)="changeEleStatus(index,'f1','1')">
              <div class="cell">
                <div id="f1"></div>
                <div *ngIf="elementShow[index].f1 == ''">{{item.f1}}</div>
                <input class="input-width" *ngIf="elementShow[index].f1 != ''" (blur)="changeEleStatus(index,'f1','2')" maxlength="2000" name="f1" [(ngModel)]="item.f1" (ngModelChange)="inputChange(index,item.f1,'f1')">
              </div>
            </td>
            <td [attr.title]="item.f3" (click)="changeEleStatus(index,'f3','1')">
              <div class="cell">
                <div id="f3"></div>
                <div *ngIf="elementShow[index].f3 == ''">{{item.f3}}</div>
                <input class="input-width" *ngIf="elementShow[index].f3 != ''" (blur)="changeEleStatus(index,'f3','2')" maxlength="2000" name="f3" [(ngModel)]="item.f3" (ngModelChange)="inputChange(index,item.f3,'f3')">
              </div>
            </td>
            <td style="width:180px !important" [attr.title]="item.f4Zh" (click)="changeEleStatus(index,'f4','1')">
              <div class="cell" style="width:180px;">
                <div id="f4"></div>
                <div *ngIf="elementShow[index].f4 == ''">{{item.f4Zh}}</div>
                <!-- <input class="input-width" maxlength="100" name="f4" [(ngModel)]="item.f4" (ngModelChange)="inputChange(index,item.f4,'f4')"> -->
                <select class="select-margin input-width" *ngIf="elementShow[index].f4 != ''" (blur)="changeEleStatus(index,'f4','2')" [(ngModel)]="item.f4" name="f4" (ngModelChange)="inputChange(index,item.f4,'f4')">
                  <!-- <option [value]="''" selected="selected">--请选择--</option> -->
                  <option [value]="it.sItemKey" *ngFor="let it of dictionaryList.RISK_BOOLMBERG_CONTROL">{{it.sItemValue}}</option>
                </select>
              </div>
            </td>
            <td [attr.title]="item.f5" (click)="changeEleStatus(index,'f5','1')">
              <div class="cell">
                <div id="f5"></div>
                <div *ngIf="elementShow[index].f5 == ''">{{item.f5}}</div>
                <input class="input-width" *ngIf="elementShow[index].f5 != ''" (blur)="changeEleStatus(index,'f5','2')" maxlength="2000" name="f5" [(ngModel)]="item.f5" (ngModelChange)="inputChange(index,item.f5,'f5')">
              </div>
            </td>
            <td [attr.title]="item.f6" (click)="changeEleStatus(index,'f6','1')">
              <div class="cell">
                <div id="f6"></div>
                <div *ngIf="elementShow[index].f6 == ''">{{item.f6}}</div>
                <input class="input-width" *ngIf="elementShow[index].f6 != ''" (blur)="changeEleStatus(index,'f6','2')" maxlength="2000" name="f6" [(ngModel)]="item.f6" (ngModelChange)="inputChange(index,item.f6,'f6')">
              </div>
            </td>
            <td [attr.title]="item.f7" (click)="changeEleStatus(index,'f7','1')">
              <div class="cell">
                <div id="f7"></div>
                <div *ngIf="elementShow[index].f7 == ''">{{item.f7}}</div>
                <input class="input-width" *ngIf="elementShow[index].f7 != ''" (blur)="changeEleStatus(index,'f7','2')" maxlength="2000" name="f7" [(ngModel)]="item.f7" (ngModelChange)="inputChange(index,item.f7,'f7')">
              </div>
            </td>
            <td [attr.title]="item.f8" (click)="changeEleStatus(index,'f8','1')">
              <div class="cell">
                <div id="f8"></div>
                <div *ngIf="elementShow[index].f8 == ''">{{item.f8}}</div>
                <input class="input-width" *ngIf="elementShow[index].f8 != ''" (blur)="changeEleStatus(index,'f8','2')" name="f8" maxlength="2000" [(ngModel)]="item.f8" (ngModelChange)="inputChange(index,item.f8,'f8')">
              </div>
            </td>
            <!-- <td [attr.title]="item.f9">
                <div class="cell">
                  <div id="f9"></div>
                  <input class="input-width" maxlength="2000" name="f9" [(ngModel)]="item.f9" (ngModelChange)="inputChange(index,item.f9,'f9')">
                </div>
              </td> -->
            <td [attr.title]="item.f10" (click)="changeEleStatus(index,'f10','1')">
              <div class="cell">
                <div id="f10"></div>
                <div *ngIf="elementShow[index].f10 == ''">{{item.f10}}</div>
                <input class="input-width" *ngIf="elementShow[index].f10 != ''" (blur)="changeEleStatus(index,'f10','2')" maxlength="2000" name="f10" [(ngModel)]="item.f10" (ngModelChange)="inputChange(index,item.f10,'f10')">
              </div>
            </td>
          </tr>
        </tbody>

      </table>
      <!-- </div> -->
    </div>
    <div class="box-footer clearfix" style="width:100%;" *ngIf="!isBlank">
      <app-pagination [currentPageNum]="listPageInfo.currentPageNum" [pagesShow]="" [totalPages]="listPageInfo.totalPages" (pageChanged)="pageNavigation($event)">
        <div class="pull-left pagination-detail" data-pagination-additional="true">
          <span class="pagination-info">
            当前显示第{{listPageInfo.startRow}}到第{{listPageInfo.endRow}}条，总共{{listPageInfo.total}}条，
          </span>
          <span class="page-list">
            每页记录
            <span class="btn-group dropup">
              <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                <span class="page-size">{{listPageInfo.pageSize}}</span>
                <span class="caret"></span>
              </button>
              <ul class="dropdown-menu" role="menu">
                <li *ngFor="let i of listPageInfo.pageList" role="menuitem" [class.active]="listPageInfo.pageSize === i" (click)="sizeChange(i)">
                  <a>{{i}}</a>
                </li>
              </ul>
            </span>
            条
          </span>
        </div>
      </app-pagination>
    </div>
  </div>
</div>

<!-- 保存提交modal -->
<div class="modal modal-detail" id="reviewBack">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">保存并提交</h4>
      </div>

      <div class="modal-body">
        <div class="row" style="margin-bottom:10px">
          <div class="col-md-12">
            <div class="box box-solid">
              <!-- <div class="box-header with-border">
                <h3 class="box-title">保存并提交</h3>
              </div> -->
              <!-- /.box-header -->

              <div class="box box-solid">
                <div class="box-header with-border">
                  <h3 class="box-title">操作确认</h3>
                </div>
                <div class="box-body">
                  <p>是否保存并提交页面上的选中信息?</p>
                </div>
              </div>

              <div class="box box-solid">
                <div class="box-header with-border">
                  <h3 class="box-title">提醒信息</h3>
                </div>
                <div class="box-body">
                  <form class="form-inline">
                    <div class="box box-default">
                      <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left:0px;margin-bottom:8px !important;">
                        <div class="row">
                          <div class="col-md-2">
                            <label class="control-label">审核/提醒人：</label>
                          </div>
                          <div class="col-md-10" style="margin-left:-25px;">
                            <input type="text" class="form-control" placeholder="提交人">
                            <button class="btn btn-primary">设置默认</button>
                            <label style="vertical-align:center" for="sms">短信提醒：</label>
                            <div class="checkbox checkbox-primary">
                              <input type="checkbox" id="sms">
                              <label></label>
                            </div>
                            <label style="vertical-align:center" for="email">邮件提醒：</label>
                            <div class="checkbox checkbox-primary">
                              <input type="checkbox" id="email">
                              <label></label>
                            </div>
                          </div>
                        </div>

                      </div>
                      <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left:0px;margin-bottom:8px !important;">
                        <div class="row">
                          <div class="col-md-2">
                            <label class="control-label">标题：</label>
                          </div>
                          <div class="col-md-10" style="margin-bottom:10px;margin-left:-25px">

                            <input type="text" style="width:100%" class="form-control" maxlength="100" placeholder="标题">
                          </div>


                          <div class="col-md-2">
                            <label class="control-label">提醒内容：</label>
                          </div>
                          <div class="col-md-10">
                            <textarea rows="6" style="width:100%;margin-left:-25px" maxlength="2000"></textarea>
                          </div>
                          <div class="col-md-2">
                            <label class="control-label">备注：</label>
                          </div>
                          <div class="col-md-10">
                            <textarea rows="6" style="width:100%;margin-left:-25px" maxlength="2000"></textarea>
                          </div>
                        </div>
                      </div>
                    </div>
                  </form>
                </div>
              </div>
              <!-- /.box-body -->
            </div>
            <!-- /.box -->
          </div>
          <!-- ./col -->
        </div>
      </div>

      <div class="modal-footer">
        <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary pull-right">保存</button>
        <!-- <button type="button" class="btn btn-primary" (click)="saveEntry()">
          <i class="fa fa-save"></i>保存</button> -->
      </div>
    </div>
  </div>

</div>
<!-- 复核通过modal end -->

<!-- 保存并提交modal -->
<div class="modal modal-detail" id="inputCommitModal">
  <div #inputCommitModal></div>
</div>

<!-- 适用QDII名称modal -->
<div class="modal modal-detail" id="applyQDIIName">
  <div #applyQDIIName></div>
</div>